package com.lagou.controller;

import com.lagou.service.ConsumerService;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class TestController {

    private Logger logger =  Logger.getLogger(this.getClass());
    @Autowired
    private ConsumerService consumerService;

    @GetMapping("/1")
    public String success(){
        return consumerService.sayHello("111",1);
    }
    @GetMapping("/2")
    public String test(){
        consumerService.cal();
        return "OK";
    }
}
